package com.gaoshi.chapter4;

import java.text.NumberFormat;
import java.time.LocalDate;
import java.util.Date;
import java.util.Locale;

public class Test {
    public static void main(String[] args) {
        System.out.println(new Date());
        System.out.println(LocalDate.now());
        System.out.println(LocalDate.of(2022, 1, 1));
        System.out.println(LocalDate.now().getDayOfWeek().getValue());

        NumberFormat currencyFormatter = NumberFormat.getCurrencyInstance(new Locale("CHINESE"));
        NumberFormat percentFormatter = NumberFormat.getPercentInstance();
        double x = 0.1;
        System.out.println(currencyFormatter.format(x));
        System.out.println(percentFormatter.format(x));
    }
}
